import { request } from 'ice'
import type { TemplateList } from '@/interfaces/template'
import type { ApiResponse } from '@/interfaces/api'
import { createGetRequest, createPostRequest } from '@/utils/request'

type TemplateListProps = {
    recordId: string,
    type: 'mz' | 'zy'
}

const getTemplateList: (props: TemplateListProps) => Promise<ApiResponse<TemplateList>> = async (data) => {
    return createGetRequest('/common/templateList', data)
}

const getTemplateDetail = async (data) => {
    return createGetRequest('/common/templateDetail', data)
}

export { getTemplateList, getTemplateDetail }